@using Microsoft.AspNetCore.Hosting
@using Microsoft.Extensions.Hosting
@{
    var theme = themeService.GetCurrentTheme();
}
@inject IThemeService themeService
<!DOCTYPE html>

<html style="height:100%">
<head>
    <meta name="viewport" content="width=device-width" />
    @if (ApplicationContext.As<CMSApplicationContext>().OuterChainPicture)
    {
        <meta name="referrer" content="same-origin" />
    }
    <title>@ViewBag.Title</title>
    @if (theme != null)
    {
        if (ApplicationContext.HostingEnvironment.IsDevelopment())
        {
            <link type="text/css" async rel="stylesheet" href="@Url.Content(theme.UrlDebugger)" />
        }
        else
        {
            <link type="text/css" async rel="stylesheet" href="@Url.Content(theme.Url)" />
        }
    }
    @StyleAtHead()
    @ScriptAtHead()
</head>
<body style="height:100%">
    <div style="height: 100%">
        @RenderBody()
    </div>
    @StyleAtFoot()
    @ScriptAtFoot()
</body>
</html>
